3.1.80 \(\int \frac {\text {sech}^4(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx\) [80]

Optimal. Leaf size=52 \[ -\frac {a \tanh ^{-1}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a+b}}\right )}{b^{3/2} \sqrt {a+b} d}+\frac {\tanh (c+d x)}{b d} \]

[Out]

-a*arctanh(b^(1/2)*tanh(d*x+c)/(a+b)^(1/2))/b^(3/2)/d/(a+b)^(1/2)+tanh(d*x+c)/b/d

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4231, 396, 214} \begin {gather*} \frac {\tanh (c+d x)}{b d}-\frac {a \tanh ^{-1}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a+b}}\right )}{b^{3/2} d \sqrt {a+b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sech[c + d*x]^4/(a + b*Sech[c + d*x]^2),x]

[Out]

-((a*ArcTanh[(Sqrt[b]*Tanh[c + d*x])/Sqrt[a + b]])/(b^(3/2)*Sqrt[a + b]*d)) + Tanh[c + d*x]/(b*d)

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 396

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[d*x*((a + b*x^n)^(p + 1)/(b*(n*(
p + 1) + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 4231

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fre
eFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 + ff^2*x^2)^(m/2 - 1)*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/
2), x]^p, x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && IntegerQ[n/2]

Rubi steps

\begin {align*} \int \frac {\text {sech}^4(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {1-x^2}{a+b-b x^2} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\tanh (c+d x)}{b d}-\frac {a \text {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\tanh (c+d x)\right )}{b d}\\ &=-\frac {a \tanh ^{-1}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a+b}}\right )}{b^{3/2} \sqrt {a+b} d}+\frac {\tanh (c+d x)}{b d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(182\) vs. \(2(52)=104\).
time = 0.48, size = 182, normalized size = 3.50 \begin {gather*} \frac {(a+2 b+a \cosh (2 (c+d x))) \text {sech}^2(c+d x) \left (a \tanh ^{-1}\left (\frac {\text {sech}(d x) (\cosh (2 c)-\sinh (2 c)) ((a+2 b) \sinh (d x)-a \sinh (2 c+d x))}{2 \sqrt {a+b} \sqrt {b (\cosh (c)-\sinh (c))^4}}\right ) (-\cosh (2 c)+\sinh (2 c))+\sqrt {a+b} \text {sech}(c) \text {sech}(c+d x) \sqrt {b (\cosh (c)-\sinh (c))^4} \sinh (d x)\right )}{2 b \sqrt {a+b} d \left (a+b \text {sech}^2(c+d x)\right ) \sqrt {b (\cosh (c)-\sinh (c))^4}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sech[c + d*x]^4/(a + b*Sech[c + d*x]^2),x]

[Out]

((a + 2*b + a*Cosh[2*(c + d*x)])*Sech[c + d*x]^2*(a*ArcTanh[(Sech[d*x]*(Cosh[2*c] - Sinh[2*c])*((a + 2*b)*Sinh
[d*x] - a*Sinh[2*c + d*x]))/(2*Sqrt[a + b]*Sqrt[b*(Cosh[c] - Sinh[c])^4])]*(-Cosh[2*c] + Sinh[2*c]) + Sqrt[a +
 b]*Sech[c]*Sech[c + d*x]*Sqrt[b*(Cosh[c] - Sinh[c])^4]*Sinh[d*x]))/(2*b*Sqrt[a + b]*d*(a + b*Sech[c + d*x]^2)
*Sqrt[b*(Cosh[c] - Sinh[c])^4])

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(137\) vs. \(2(44)=88\).
time = 1.54, size = 138, normalized size = 2.65

method result size
derivativedivides \(\frac {\frac {2 a \left (-\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}\right )}{b}+\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{b \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d}\) \(138\)
default \(\frac {\frac {2 a \left (-\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}\right )}{b}+\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{b \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d}\) \(138\)
risch \(-\frac {2}{b d \left (1+{\mathrm e}^{2 d x +2 c}\right )}+\frac {a \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {a b +b^{2}}+2 b \sqrt {a b +b^{2}}+2 a b +2 b^{2}}{a \sqrt {a b +b^{2}}}\right )}{2 \sqrt {a b +b^{2}}\, d b}-\frac {a \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {a b +b^{2}}+2 b \sqrt {a b +b^{2}}-2 a b -2 b^{2}}{a \sqrt {a b +b^{2}}}\right )}{2 \sqrt {a b +b^{2}}\, d b}\) \(173\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(d*x+c)^4/(a+b*sech(d*x+c)^2),x,method=_RETURNVERBOSE)

[Out]

1/d*(2*a/b*(-1/4/b^(1/2)/(a+b)^(1/2)*ln((a+b)^(1/2)*tanh(1/2*d*x+1/2*c)^2+2*tanh(1/2*d*x+1/2*c)*b^(1/2)+(a+b)^
(1/2))+1/4/b^(1/2)/(a+b)^(1/2)*ln((a+b)^(1/2)*tanh(1/2*d*x+1/2*c)^2-2*tanh(1/2*d*x+1/2*c)*b^(1/2)+(a+b)^(1/2))
)+2/b*tanh(1/2*d*x+1/2*c)/(tanh(1/2*d*x+1/2*c)^2+1))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 91 vs. \(2 (44) = 88\).
time = 0.50, size = 91, normalized size = 1.75 \begin {gather*} \frac {a \log \left (\frac {a e^{\left (-2 \, d x - 2 \, c\right )} + a + 2 \, b - 2 \, \sqrt {{\left (a + b\right )} b}}{a e^{\left (-2 \, d x - 2 \, c\right )} + a + 2 \, b + 2 \, \sqrt {{\left (a + b\right )} b}}\right )}{2 \, \sqrt {{\left (a + b\right )} b} b d} + \frac {2}{{\left (b e^{\left (-2 \, d x - 2 \, c\right )} + b\right )} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^4/(a+b*sech(d*x+c)^2),x, algorithm="maxima")

[Out]

1/2*a*log((a*e^(-2*d*x - 2*c) + a + 2*b - 2*sqrt((a + b)*b))/(a*e^(-2*d*x - 2*c) + a + 2*b + 2*sqrt((a + b)*b)
))/(sqrt((a + b)*b)*b*d) + 2/((b*e^(-2*d*x - 2*c) + b)*d)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 202 vs. \(2 (44) = 88\).
time = 0.38, size = 645, normalized size = 12.40 \begin {gather*} \left [\frac {{\left (a \cosh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a \sinh \left (d x + c\right )^{2} + a\right )} \sqrt {a b + b^{2}} \log \left (\frac {a^{2} \cosh \left (d x + c\right )^{4} + 4 \, a^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + a^{2} \sinh \left (d x + c\right )^{4} + 2 \, {\left (a^{2} + 2 \, a b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, a^{2} \cosh \left (d x + c\right )^{2} + a^{2} + 2 \, a b\right )} \sinh \left (d x + c\right )^{2} + a^{2} + 8 \, a b + 8 \, b^{2} + 4 \, {\left (a^{2} \cosh \left (d x + c\right )^{3} + {\left (a^{2} + 2 \, a b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + 4 \, {\left (a \cosh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a \sinh \left (d x + c\right )^{2} + a + 2 \, b\right )} \sqrt {a b + b^{2}}}{a \cosh \left (d x + c\right )^{4} + 4 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + a \sinh \left (d x + c\right )^{4} + 2 \, {\left (a + 2 \, b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, a \cosh \left (d x + c\right )^{2} + a + 2 \, b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (a \cosh \left (d x + c\right )^{3} + {\left (a + 2 \, b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a}\right ) - 4 \, a b - 4 \, b^{2}}{2 \, {\left ({\left (a b^{2} + b^{3}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (a b^{2} + b^{3}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a b^{2} + b^{3}\right )} d \sinh \left (d x + c\right )^{2} + {\left (a b^{2} + b^{3}\right )} d\right )}}, -\frac {{\left (a \cosh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a \sinh \left (d x + c\right )^{2} + a\right )} \sqrt {-a b - b^{2}} \arctan \left (\frac {{\left (a \cosh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a \sinh \left (d x + c\right )^{2} + a + 2 \, b\right )} \sqrt {-a b - b^{2}}}{2 \, {\left (a b + b^{2}\right )}}\right ) + 2 \, a b + 2 \, b^{2}}{{\left (a b^{2} + b^{3}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (a b^{2} + b^{3}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a b^{2} + b^{3}\right )} d \sinh \left (d x + c\right )^{2} + {\left (a b^{2} + b^{3}\right )} d}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^4/(a+b*sech(d*x+c)^2),x, algorithm="fricas")

[Out]

[1/2*((a*cosh(d*x + c)^2 + 2*a*cosh(d*x + c)*sinh(d*x + c) + a*sinh(d*x + c)^2 + a)*sqrt(a*b + b^2)*log((a^2*c
osh(d*x + c)^4 + 4*a^2*cosh(d*x + c)*sinh(d*x + c)^3 + a^2*sinh(d*x + c)^4 + 2*(a^2 + 2*a*b)*cosh(d*x + c)^2 +
 2*(3*a^2*cosh(d*x + c)^2 + a^2 + 2*a*b)*sinh(d*x + c)^2 + a^2 + 8*a*b + 8*b^2 + 4*(a^2*cosh(d*x + c)^3 + (a^2
 + 2*a*b)*cosh(d*x + c))*sinh(d*x + c) + 4*(a*cosh(d*x + c)^2 + 2*a*cosh(d*x + c)*sinh(d*x + c) + a*sinh(d*x +
 c)^2 + a + 2*b)*sqrt(a*b + b^2))/(a*cosh(d*x + c)^4 + 4*a*cosh(d*x + c)*sinh(d*x + c)^3 + a*sinh(d*x + c)^4 +
 2*(a + 2*b)*cosh(d*x + c)^2 + 2*(3*a*cosh(d*x + c)^2 + a + 2*b)*sinh(d*x + c)^2 + 4*(a*cosh(d*x + c)^3 + (a +
 2*b)*cosh(d*x + c))*sinh(d*x + c) + a)) - 4*a*b - 4*b^2)/((a*b^2 + b^3)*d*cosh(d*x + c)^2 + 2*(a*b^2 + b^3)*d
*cosh(d*x + c)*sinh(d*x + c) + (a*b^2 + b^3)*d*sinh(d*x + c)^2 + (a*b^2 + b^3)*d), -((a*cosh(d*x + c)^2 + 2*a*
cosh(d*x + c)*sinh(d*x + c) + a*sinh(d*x + c)^2 + a)*sqrt(-a*b - b^2)*arctan(1/2*(a*cosh(d*x + c)^2 + 2*a*cosh
(d*x + c)*sinh(d*x + c) + a*sinh(d*x + c)^2 + a + 2*b)*sqrt(-a*b - b^2)/(a*b + b^2)) + 2*a*b + 2*b^2)/((a*b^2
+ b^3)*d*cosh(d*x + c)^2 + 2*(a*b^2 + b^3)*d*cosh(d*x + c)*sinh(d*x + c) + (a*b^2 + b^3)*d*sinh(d*x + c)^2 + (
a*b^2 + b^3)*d)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {sech}^{4}{\left (c + d x \right )}}{a + b \operatorname {sech}^{2}{\left (c + d x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)**4/(a+b*sech(d*x+c)**2),x)

[Out]

Integral(sech(c + d*x)**4/(a + b*sech(c + d*x)**2), x)

________________________________________________________________________________________

Giac [A]
time = 0.64, size = 72, normalized size = 1.38 \begin {gather*} -\frac {\frac {a \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} + a + 2 \, b}{2 \, \sqrt {-a b - b^{2}}}\right )}{\sqrt {-a b - b^{2}} b} + \frac {2}{b {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^4/(a+b*sech(d*x+c)^2),x, algorithm="giac")

[Out]

-(a*arctan(1/2*(a*e^(2*d*x + 2*c) + a + 2*b)/sqrt(-a*b - b^2))/(sqrt(-a*b - b^2)*b) + 2/(b*(e^(2*d*x + 2*c) +
1)))/d

________________________________________________________________________________________

Mupad [B]
time = 0.48, size = 166, normalized size = 3.19 \begin {gather*} \frac {a\,\ln \left (\frac {4\,{\mathrm {e}}^{2\,c+2\,d\,x}}{b}-\frac {2\,\left (a\,d+a\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}+2\,b\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^{3/2}\,d\,\sqrt {a+b}}\right )}{2\,b^{3/2}\,d\,\sqrt {a+b}}-\frac {2}{b\,d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {a\,\ln \left (\frac {4\,{\mathrm {e}}^{2\,c+2\,d\,x}}{b}+\frac {2\,\left (a\,d+a\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}+2\,b\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^{3/2}\,d\,\sqrt {a+b}}\right )}{2\,b^{3/2}\,d\,\sqrt {a+b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cosh(c + d*x)^4*(a + b/cosh(c + d*x)^2)),x)

[Out]

(a*log((4*exp(2*c + 2*d*x))/b - (2*(a*d + a*d*exp(2*c + 2*d*x) + 2*b*d*exp(2*c + 2*d*x)))/(b^(3/2)*d*(a + b)^(
1/2))))/(2*b^(3/2)*d*(a + b)^(1/2)) - 2/(b*d*(exp(2*c + 2*d*x) + 1)) - (a*log((4*exp(2*c + 2*d*x))/b + (2*(a*d
 + a*d*exp(2*c + 2*d*x) + 2*b*d*exp(2*c + 2*d*x)))/(b^(3/2)*d*(a + b)^(1/2))))/(2*b^(3/2)*d*(a + b)^(1/2))

________________________________________________________________________________________